package filter.practice_02;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author yi qiang
 * @date 2021/11/10 2:08
 */
public class TimeCriteria implements Criteria {

    @Override
    public List<Order> doFilter(List<Order> orderList) {
        List<Order> results = new ArrayList<>();
        for (Order order : orderList) {
            if (order.getCreateTime().before(new Date())) {
                results.add(order);
            }
        }
        return results;
    }

}
